﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace Ecommerce.Migrations
{
    public partial class UpdateTableOrderNum : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "SaleNumber",
                table: "tbSaleNums",
                newName: "Num");

            migrationBuilder.RenameColumn(
                name: "SaleNumState",
                table: "tbSaleNums",
                newName: "Price");

            migrationBuilder.AddColumn<string>(
                name: "Name",
                table: "tbSaleNums",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "SmallImage",
                table: "tbSaleNums",
                type: "nvarchar(max)",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Name",
                table: "tbSaleNums");

            migrationBuilder.DropColumn(
                name: "SmallImage",
                table: "tbSaleNums");

            migrationBuilder.RenameColumn(
                name: "Price",
                table: "tbSaleNums",
                newName: "SaleNumState");

            migrationBuilder.RenameColumn(
                name: "Num",
                table: "tbSaleNums",
                newName: "SaleNumber");
        }
    }
}
